package com.sky.mapper;

import com.sky.annotation.AutoFill;
import com.sky.entity.DishFlavor;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author hu
 * @date 2025/5/21
 */
@Mapper
public interface DishFlavorMapper {

    /**
     * 批量插入菜品口味
     * @param flavors
     */
    @AutoFill(OperationType.INSERT)
    void insertBach(List<DishFlavor> flavors);

    /**
     * 根据ID批量删除口味
     * @param dishIds
     */
    void deleteByDishByIds(List<Long> dishIds);

    /**
     * 根据菜品id查询对应的口味
     * @param dishId
     * @return
     */
    List<DishFlavor> getByDishId(@Param("dishId") Long dishId);
}
